﻿using Abp.Authorization;
using Abp.Localization;
using Abp.Notifications;
using pandx.Mulan.Authorization;

namespace pandx.Mulan.Notifications
{
    public class AppNotificationProvider:NotificationProvider
    {
        public override void SetNotifications(INotificationDefinitionContext context)
        {
            context.Manager.Add(
                new NotificationDefinition(
                    AppNotifications.NewUserRegistered,
                    displayName: L("NewUserRegisteredNotificationDefinition"),
                    permissionDependency: new SimplePermissionDependency(AppPermissions.Pages_Administration_Users)
                )
            );
            
        }
        private static ILocalizableString L(string name)
        {
            return new LocalizableString(name, CoreConsts.LocalizationSourceName);
        }
    }
}